(function(){
    var nowDate = new Date(); //申明一个时间对象；
    var nowYear=nowDate.getFullYear();//获取当前的年份；
    var nowMonth=nowDate.getMonth()+1;//获取当前的月份；
    var nowDay=nowDate.getDate();//获取当前的天数；
    //-----判断---=---
    dateFun();
    function dateFun(){
        if(nowYear%100==0){//世纪年判断
            if(nowYear%400==0){//闰年判断
                console.log("世纪年闰年")


            }else{//平年判断
                console.log("世纪年平年")
            }


        }else{//非世纪年
            if(nowYear%4==0){//闰年判断
                console.log("非世纪年闰年")
            }else{//平年判断
                console.log("非世纪年平年");
                //年份框
                var htmlYear="<option selected>"+nowYear+"</option>" +
                    "<option>"+(nowYear+1)+"</option>"
                $(".nowYearTM").html(htmlYear);
                //月份框
                if(nowMonth==1){
                    monthFun("selected","","","","","","","","","","","")
                }else if(nowMonth==2){
                    monthFun("","selected","","","","","","","","","","")
                }else if(nowMonth==3){
                    monthFun("","","selected","","","","","","","","","")
                }else if(nowMonth==4){
                    monthFun("","","","selected","","","","","","","","")
                }else if(nowMonth==5){
                    monthFun("","","","","selected","","","","","","","")
                }else if(nowMonth==6){
                    monthFun("","","","","","selected","","","","","","")
                }else if(nowMonth==7){
                    monthFun("","","","","","","selected","","","","","")
                }else if(nowMonth==8){
                    monthFun("","","","","","","","selected","","","","")
                }else if(nowMonth==9){
                    monthFun("","","","","","","","","selected","","","")
                }else if(nowMonth==10){
                    monthFun("","","","","","","","","","selected","","")
                }else if(nowMonth==11){
                    monthFun("","","","","","","","","","","selected","")
                }else if(nowMonth==12){
                    monthFun("","","","","","","","","","","","selected")
                }
                //天数框
                var htmlDay="<option selected>"+nowDay+"</option>" +
                    "<option>"+(nowDay+1)+"</option>"
                $(".nowDayTM").html(htmlDay);
            }
        }
        function monthFun(text1,text2,text3,text4,text5,text6,text7,text8,text9,text10,text11,text12){
            var htmlMonth="<option "+text1+">"+1+"</option>" +
                "<option "+text2+">"+2+"</option>" +
                "<option "+text3+">"+3+"</option>" +
                "<option "+text4+">"+4+"</option>" +
                "<option "+text5+">"+5+"</option>" +
                "<option "+text6+">"+6+"</option>" +
                "<option "+text7+">"+7+"</option>" +
                "<option "+text8+">"+8+"</option>" +
                "<option "+text9+">"+9+"</option>" +
                "<option "+text10+">"+10+"</option>" +
                "<option "+text11+">"+11+"</option>" +
                "<option "+text12+">"+12+"</option>";
            $(".nowMonthTM").html(htmlMonth);
        }






    }










})()
